<app:aside-block class='aside-block-highlighted' heading='Room Controller' visibility-model='Room.asidePanels.view'>
<div ng:controller='Top.Game.Room.ControllerProperties as ControllerProperties'>
<div class='object-properties-id'>
ID: {{Room.selectedObject._id}}
</div>
<div>
<label>Owner:</label>
<span ng:if='Room.selectedObject.user'>
<a ng:href="#!{{ 'top.profile' | routeSegmentUrlStateless:{username: Room.users[Room.selectedObject.user].username} }}" ng:if="!_.contains(['0','1','2','3'], Room.selectedObject.user)" title='View user profile'>
<img app:badge-src='Room.users[Room.selectedObject.user].badge'>
{{Room.users[Room.selectedObject.user].username}}
</a>
<span ng:if="_.contains(['0','1','2','3'], Room.selectedObject.user)">
{{Room.users[Room.selectedObject.user].username}}
</span>
</span>
<span ng:if='!Room.selectedObject.user'>None</span>
</div>
<div>
<label>Position:</label>
{{Room.selectedObject.x}}, {{Room.selectedObject.y}}
</div>
<div>
<label>Level:</label>
{{Room.selectedObject.level}}
</div>
<div ng:if='Room.selectedObject.level &amp;&amp; Room.selectedObject.level&lt;8'>
<label>Progress:</label>
{{Room.selectedObject.progress | round}} /
<span ng-class='{damaged: ControllerProperties.isDowngradeActive()}'>
{{ Room.selectedObject.tutorial && Room.selectedObject.level == 1 ? 4 : ptr ? 1000 : Room.Constants.CONTROLLER_LEVELS[Room.selectedObject.level] | round}}
</span>
<a app-nw-external-link class='help' href='https://docs.screeps.com/api/#StructureController.ticksToDowngrade' ng-if='ControllerProperties.isDowngradeActive()' target='_blank' title='This controller cannot levelled up until the downgrade timer is active (Click to learn more)'>
<i class='fa fa-question-circle'></i>
</a>
</div>
<div ng:if='Room.selectedObject.reservation'>
<label>Reserved:</label>
<a ng:href="#!{{ 'top.profile' | routeSegmentUrlStateless:{username: Room.users[Room.selectedObject.reservation.user].username} }}" ng:if='!Room.isUserNPC(Room.selectedObject.reservation.user)' title='View user profile'>
<img app:badge-src='Room.users[Room.selectedObject.reservation.user].badge'>
{{Room.users[Room.selectedObject.reservation.user].username}}
</a>
<span ng:if='Room.isUserNPC(Room.selectedObject.reservation.user)'>
<a>
<img app:badge-src='Room.users[Room.selectedObject.reservation.user].badge'>
</a>
{{Room.users[Room.selectedObject.reservation.user].username}}
</span>
<span ng:if='Room.gameTime'>
({{Room.selectedObject.reservation.endTime - Room.gameTime}})
</span>
</div>
<div class='damaged' ng:if='ControllerProperties.isDowngradeActive()'>
<label>Downgrade in:</label>
{{Room.selectedObject.downgradeTime - Room.gameTime}}
<a app-nw-external-link class='help' href='http://docs.screeps.com/control.html' target='_blank' title='Upgrade your controller to avoid downgrading (Click to learn more)'>
<i class='fa fa-question-circle'></i>
</a>
</div>
<div class='damaged' ng:if='Room.gameTime &amp;&amp; Room.selectedObject.upgradeBlocked &gt;= Room.gameTime'>
<label>Upgrade blocked:</label>
{{Room.selectedObject.upgradeBlocked - Room.gameTime}}
</div>
<div>
<label>Safe modes available:</label>
{{Room.selectedObject.safeModeAvailable || 0}}
</div>
<div ng:if='Room.gameTime &amp;&amp; Room.selectedObject.safeModeCooldown &gt;= Room.gameTime'>
<label>Safe mode cooldown:</label>
{{Room.selectedObject.safeModeCooldown - Room.gameTime}}
</div>
<div class='safe' ng:if='Room.gameTime &amp;&amp; Room.selectedObject.safeMode &gt; Room.gameTime'>
<label>Safe mode:</label>
{{Room.selectedObject.safeMode - Room.gameTime}}
</div>
<div>
<label>Power enabled:</label>
<span class='damaged' ng:if='Room.selectedObject.isPowerEnabled'>Yes</span>
<span ng:if='!Room.selectedObject.isPowerEnabled'>No</span>
</div>
<div class='body controller-sign' ng-if='Room.selectedObject.sign || Room.selectedObject.hardSign'>
<div class='controller-sign__text'>
<label>Sign:</label>
&ldquo;{{Room.selectedObject.hardSign.text || Room.selectedObject.sign.text}}&rdquo;
</div>
<div class='controller-sign__author'>
&mdash;&nbsp;
<a ng-if='!Room.selectedObject.hardSign' ng:href="#!{{ 'top.profile' | routeSegmentUrlStateless:{username: Room.users[Room.selectedObject.sign.user].username} }}" title='View user profile'>
<img app:badge-src='Room.users[Room.selectedObject.sign.user].badge'>
{{Room.users[Room.selectedObject.sign.user].username}}
</a>
<span ng-if='Room.selectedObject.hardSign'>Screeps</span>
</div>
<div class='controller-sign__date' title='tick # {{Room.selectedObject.hardSign.time || Room.selectedObject.sign.time}}'>
{{(Room.selectedObject.hardSign.datetime || Room.selectedObject.sign.datetime) | readableDate}}
</div>
</div>
<ng-include src="'room-object-effects'"></ng-include>
<md:button class='md-primary md-hue-1 allwidth' ng:click='ControllerProperties.increaseLevel()' ng:if='Game.simulationMode'>
Increase level
</md:button>
<md:button class='md-primary md-hue-1 allwidth' ng:click='ControllerProperties.decreaseLevel()' ng:if='Game.simulationMode'>
Decrease level
</md:button>
<md:button class='md-primary md-hue-1 allwidth' ng-disabled='ControllerProperties.isSafeModeDisabled()' ng:click='ControllerProperties.activateSafeMode()' ng:if='!Game.readOnly &amp;&amp; (Room.selectedObject.user == Game.player || Room.selectedObject.user == 0 &amp;&amp; Game.player == Me()._id)'>
Activate safe mode
</md:button>
<md:button class='md-primary md-hue-1 allwidth' ng:click='ControllerProperties.unclaim()' ng:if='!Game.readOnly &amp;&amp; (Room.selectedObject.user == Game.player || Room.selectedObject.user == 0 &amp;&amp; Game.player == Me()._id)'>
{{ControllerProperties.askUnclaim ? 'Click again to confirm' : 'Unclaim'}}
</md:button>
</div>
</app:aside-block>
